<div class="fm-content">
    <!-- 最上面标题栏 -->
    <div class="title">
        <i nz-icon [type]="'desktop'"></i>
        &nbsp;&nbsp;安保人员
    </div>
    <!-- 内容 -->
    <div class="work">
        <div class="top">
          <nz-select class="fm-input first-input" style="width: 12%" (nzOpenChange)="workTypeDic.load('0')" [(ngModel)]="fs.queryObject['workType:=']"
                     [nzPlaceHolder]="'工种'">
            <nz-option *ngFor="let option of workTypeDic.datas" [nzLabel]="option.display" [nzValue]="option.id">
            </nz-option>
            <nz-option *ngIf="workTypeDic.isLoading" nzDisabled nzCustomContent>
              <i nz-icon type="loading" class="loading-icon"></i>加载中...
            </nz-option>
          </nz-select>
            <nz-select class="fm-input" style="width: 12%" (nzOpenChange)="airportDic.load('0')" [(ngModel)]="fs.queryObject['unit:=']"
                [nzPlaceHolder]="'单位'">
                <nz-option *ngFor="let option of airportDic.datas" [nzLabel]="option.display" [nzValue]="option.id">
                </nz-option>
                <nz-option *ngIf="airportDic.isLoading" nzDisabled nzCustomContent>
                    <i nz-icon type="loading" class="loading-icon"></i>加载中...
                </nz-option>
            </nz-select>
          <nz-select class="fm-input" style="width: 12%" (nzOpenChange)="qualificationDic.load('0')" [(ngModel)]="fs.queryObject['qualification:=']"
                     [nzPlaceHolder]="'资质'">
            <nz-option *ngFor="let option of qualificationDic.datas" [nzLabel]="option.display" [nzValue]="option.id">
            </nz-option>
            <nz-option *ngIf="qualificationDic.isLoading" nzDisabled nzCustomContent>
              <i nz-icon type="loading" class="loading-icon"></i>加载中...
            </nz-option>
          </nz-select>
          <nz-date-picker placeholder="复训时间"  class="fm-input"[(ngModel)]="reQualificationTime"></nz-date-picker>
            <nz-button-group>
                <button nz-button nzType="primary" (click)="loadData()">查询</button>
                <button nz-button
                    (click)="fs.resetQueryObject() && fs.loadData(true)">重置</button>
            </nz-button-group>
            <div class="tool-right">
                <nz-button-group>
                    <button *ngIf="ss.mi.sa || ss.mi.abryxz" nz-button [nzType]="'primary'" (click)="editRow(null)">新增</button>
                    <!-- <button nz-button (click)="fs.editRow()">编辑</button> -->
                    <button *ngIf="ss.mi.sa || ss.mi.abrysc" nz-popconfirm nzTitle="确认删除选择项?" (nzOnConfirm)="fs.delEntitys()"
                        nzPlacement="bottomRight" nz-button>删除</button>
                  <a nz-button href="assets/images/安保人员.xlsx" download="安保人员.xlsx">模板下载</a>
                    <button nz-button (click)="fs.export('xjmh_abry.html', '安保人员.xls')">导出</button>
                      <nz-upload nzAction="{{ fs.getExcelUploadUrl() }}" [nzLimit]="1" [nzHeaders]="ffs.fileHeaders"
                               [nzFilter]="fs.excelFilters" [nzAccept]="'.xls,.xlsx'" (nzChange)="excelHandleChange($event)">
                      <button *ngIf="ss.mi.sa || ss.mi.abryxz" nz-button>导入</button>
                    </nz-upload>
                </nz-button-group>

            </div>
        </div>

        <!-- 右则样表单主体 -->
        <div class="work-content">
            <div class="table">
                <nz-table nzSize="middle" nzShowSizeChanger [nzPageSizeOptions]='[ 10, 15, 20, 30, 40, 50 ]'
                    [nzFrontPagination]="false" [nzData]="fs.datas" [nzLoading]="fs.isLoading || fs.isDeleing"
                    [nzTotal]="fs.rowsCount" [(nzPageIndex)]="fs.pageIndex" [(nzPageSize)]="fs.pageSize"
                    (nzPageIndexChange)="fs.loadData()" (nzPageSizeChange)="fs.loadData(true)"
                    [nzScroll]="{ x: '1000px' }">
                    <thead>
                        <tr>
                            <th nzWidth="50px" nzShowCheckbox [(nzChecked)]="fs.allChecked"
                                [nzIndeterminate]="fs.indeterminate" (nzCheckedChange)="fs.checkAll($event)"></th>
                            <th nzWidth="70px">姓名</th>
                            <th nzWidth="50px">性别</th>
                            <th nzWidth="70px">身份证</th>
                            <th nzWidth="100px">生日</th>
                            <th nzWidth="100px">单位</th>
                            <th nzWidth="70px">部门</th>
                            <th nzWidth="100px">工种</th>
                            <th nzWidth="100px">工作时间</th>
                            <th nzWidth="100px">资质情况</th>
                            <th nzWidth="100px">获取资质时间</th>
                            <th nzWidth="100px">复训时间</th>
                            <th nzWidth="70px">复训结论</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr *ngFor="let data of fs.datas">
                            <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="fs.refreshCheckStatus()">
                            </td>
                            <!-- <td><span (click)="fs.editRow(data)" class="form-edit"></span></td> -->
                            <td><span (click)="editRow(data)" class="form-edit">{{data.name}}</span></td>
                            <td>{{data.genderName}}</td>
                            <td>{{data.idCard}}</td>
                            <td>{{data.birthday | date:'yyyy-MM-dd' }}</td>
                            <td>{{data.unitName}}</td>
                            <td>{{data.departmentName}}</td>
                            <td>{{data.workTypeName}}</td>
                            <td>{{data.enterTime | date:'yyyy-MM-dd' }}</td>
                            <td>{{data.qualificationName}}</td>
                            <td>{{data.qualificationTime | date:'yyyy-MM-dd' }}</td>
                            <td>{{data.reQualificationTime | date:'yyyy-MM-dd' }}</td>
                            <td>{{data.reQualificationResultName}}</td>
                        </tr>
                    </tbody>
                </nz-table>
            </div>
        </div>
      <div>

      </div>
    </div>
</div>
